package com.dhcc.bpm.modules.system.service;

import com.dhcc.bpm.modules.system.entity.UserRole;
import com.dhcc.bpm.modules.system.vo.UserRoleVO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.List;

/**
 * @ClassName IUserRoleService
 * @Description  服务类
 * @Author sjm
 * @Date 2020/2/21 0021 15:16
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 **/
public interface IUserRoleService extends IService<UserRole> {

	/**
	 * @Description 自定义分页
	 * @Author sjm
	 * @Date 10:23 2020/2/22 0022
	 * @param page
	 * @param userRole
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.dhcc.bpm.modules.system.vo.UserRoleVO>
	 **/
	IPage<UserRoleVO> selectUserRolePage(IPage<UserRoleVO> page, UserRoleVO userRole);

	/**
	 * @Description 添加用户角色中间表
	 * @Author sjm
	 * @Date 10:23 2020/2/22 0022
	 * @param userId
	 * @param roleId
	 * @return boolean
	 **/
	boolean batchUserRole(Long userId, String roleId);

	/**
	 * @Description 查询集合
	 * @Author sjm
	 * @Date 10:23 2020/2/22 0022
	 * @param userId
	 * @return java.util.List<com.dhcc.bpm.modules.system.entity.UserRole>
	 **/
	List<UserRole> selectUserByUserId(Long userId);

	/**
	 * @Description 根据userId删除
	 * @Author sjm
	 * @Date 10:23 2020/2/22 0022
	 * @param userId
	 * @return boolean
	 **/
	boolean removeByUserId(Long userId);
}
